package cn.itcast.tanhua.autoconfig;

import cn.itcast.tanhua.autoconfig.proerties.AipFaceProperties;
import cn.itcast.tanhua.autoconfig.proerties.HuanXinProperties;
import cn.itcast.tanhua.autoconfig.proerties.OssProperties;
import cn.itcast.tanhua.autoconfig.proerties.SmsProperties;
import cn.itcast.tanhua.autoconfig.template.AipFaceTemplate;
import cn.itcast.tanhua.autoconfig.template.HuanXinTemplate;
import cn.itcast.tanhua.autoconfig.template.OssTemplate;
import cn.itcast.tanhua.autoconfig.template.SmsTemplate;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;

/**
 * @author Administrator
 */
@EnableConfigurationProperties({
        SmsProperties.class,
        OssProperties.class,
        AipFaceProperties.class,
        //其他省略
        HuanXinProperties.class
})
public class TanhuaAutoConfiguration {

    @Bean
    public SmsTemplate smsTemplate(SmsProperties smsProperties) {
        return new SmsTemplate(smsProperties);
    }

    @Bean
    public OssTemplate ossTemplate(OssProperties properties) {
        return new OssTemplate(properties);
    }
    @Bean
    public AipFaceTemplate aipFaceTemplate() {
        return new AipFaceTemplate();
    }

    @Bean
    public HuanXinTemplate huanXinTemplate(HuanXinProperties properties) {
        return new HuanXinTemplate(properties);
    }
}